# Contributor: Christian Kampka <christian@kampka.net>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=dockerize
pkgver=0.6.1
pkgrel=12
pkgdesc="Utility to simplify running applications in docker containers."
url="https://github.com/jwilder/dockerize"
arch="all"
license="MIT"
options="!check" # No test suite
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/jwilder/dockerize/archive/v$pkgver.tar.gz
	go.mod
	go.sum
	"

prepare() {
	default_prepare

	cp "$srcdir"/go.mod "$builddir"/go.mod
	cp "$srcdir"/go.sum "$builddir"/go.sum
}

build() {
	go build -ldflags "-X main.buildVersion=$pkgver"
}

package() {
	install -Dm0755 dockerize "$pkgdir"/usr/bin/dockerize
	install -dm0755 "$pkgdir"/usr/share/dockerize/
	cp -r examples "$pkgdir"/usr/share/dockerize/
}

sha512sums="5ee217b97a23cde8a56ec4c4a262152343d777f95813582d93d2f97f3348ba67bbd415a071ad6449157ab261f65d2dbe2d41e4bb69e37c0699d79947b4af6c12  dockerize-0.6.1.tar.gz
b8d6c6608a6e4a77b325a46c7e3e8b35d65d631294ad9dd414e1e8a7a6d181b89630572f30e8de87ee399dca9a906aa10cc240e827b06e23cfcf789d453478cf  go.mod
d994a4d78e3291be9803fe8f98fed2fd02a5b428faf52e682f799331d09a2393462360916a78e3198257e0d55528f8d7080790ba4dafb04f436885070607fe71  go.sum"
